﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyBlog.DataAccess
{
    public class Singleton<T> where T : Singleton<T>, new()
    {
        static T _instance;

        public static T Instance
        {
            get
            {
                return _instance ?? (_instance = new T());
            }
        }

    }
}
